package com.lrr.entity;

import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

public class Water {
    private Integer id;
    @NotNull(message = "不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date dates;
    @NotNull(message = "不能为空")
    private Integer counts;
    @NotBlank(message = "不能为空")
    private String name;
    @NotNull(message = "不能为空")
    private BigDecimal jie;
    @NotNull(message = "不能为空")
    private BigDecimal dai;
    @NotNull(message = "不能为空")
    private BigDecimal money;
    @NotBlank(message = "不能为空")
    private String other;
    private Integer homeId;
    private Integer magId;

    @Valid
    private Company c1;
    @Valid
    private Company c2;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getDates() {
        return dates;
    }

    public void setDates(Date dates) {
        this.dates = dates;
    }

    public Integer getCounts() {
        return counts;
    }

    public void setCounts(Integer counts) {
        this.counts = counts;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getJie() {
        return jie;
    }

    public void setJie(BigDecimal jie) {
        this.jie = jie;
    }

    public BigDecimal getDai() {
        return dai;
    }

    public void setDai(BigDecimal dai) {
        this.dai = dai;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public String getOther() {
        return other;
    }

    public void setOther(String other) {
        this.other = other;
    }

    public Integer getHomeId() {
        return homeId;
    }

    public void setHomeId(Integer homeId) {
        this.homeId = homeId;
    }

    public Integer getMagId() {
        return magId;
    }

    public void setMagId(Integer magId) {
        this.magId = magId;
    }

    public Company getC1() {
        return c1;
    }

    public void setC1(Company c1) {
        this.c1 = c1;
    }

    public Company getC2() {
        return c2;
    }

    public void setC2(Company c2) {
        this.c2 = c2;
    }
}
